From da4751c66afe3362078690d5f8673fa17cbb9747 Mon Sep 17 00:00:00 2001 From: Julian Date: Tue, 27 Dec 2022 17:54:28 -0800 Subject: [PATCH] enabling flakes --- configuration.nix | 1 + configuration.nix.save | 165 ----------------------------------------- flake.nix | 11 +++ user-jsutter.nix | 42 +++++------ 4 files changed, 33 insertions(+), 186 deletions(-) delete mode 100644 configuration.nix.save create mode 100644 flake.nix diff --git a/configuration.nix b/configuration.nix index 441b48e..288568e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -102,6 +102,7 @@ arc-theme zoom-us slack + vscodium ]; }; diff --git a/configuration.nix.save b/configuration.nix.save deleted file mode 100644 index 3a522cf..0000000 --- a/configuration.nix.save +++ /dev/null @@ -1,165 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - -{ - imports = - [ - ./hardware-configuration.nix - ./user-jsutter.nix - ]; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - - # Kernel - boot.kernelPackages = pkgs.linuxPackages_latest; - - # Flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # Power Stuff - services.power-profiles-daemon.enable = false; - services.tlp = { - enable = true; - settings = { - CPU_BOOST_ON_BAT = 0; - CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave"; - START_CHARGE_THRESH_BAT0 = 90; - STOP_CHARGE_THRESH_BAT0 = 97; - RUNTIME_PM_ON_BAT = "auto"; - }; - }; - - networking.hostName = "framework"; # Define your hostname. - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "America/Los_Angeles"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - - # Services - services.xserver.enable = true; - - # Enable the GNOME Desktop Environment. - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - - # Configure keymap in X11 - services.xserver = { - layout = "us"; - xkbVariant = ""; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.jsutter = { - isNormalUser = true; - description = "Julian Sutter"; - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - alacritty - tor-browser-bundle-bin - nextcloud-client - vlc - deluge - steam - vmware-horizon-client - kleopatra - pinentry - arc-theme - zoom-us - slack - ]; - }; - - # Options for Steam - programs.steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - }; - programs.java.enable = true; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - # System packages - environment.systemPackages = with pkgs; [ - fish - git - firefox - curl - file - gdb - unar - lsof - pciutils - htop - sysstat - nmap - powertop - gnupg - p7zip - rsync - bumblebee - glxinfo - libgdiplus - ]; - - # GNUPG Stuff - -services.pcscd.enable = true; - programs.gnupg.agent = { - enable = true; - pinentryFlavor = "gnome3"; - enableSSHSupport = true; -}; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - services.openssh.enable = true; - - system.stateVersion = "22.11"; # Did you read the comment? - -} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a96aa14 --- /dev/null +++ b/flake.nix @@ -0,0 +1,11 @@ +{ + description = "A very basic flake"; + + outputs = { self, nixpkgs }: { + + packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello; + + packages.x86_64-linux.default = self.packages.x86_64-linux.hello; + + }; +} diff --git a/user-jsutter.nix b/user-jsutter.nix index dae027c..fb21fae 100644 --- a/user-jsutter.nix +++ b/user-jsutter.nix @@ -25,28 +25,28 @@ in }; # Add Firefox GNOME theme directory -home.file."firefox-gnome-theme" = { - target = ".mozilla/firefox/default/chrome/firefox-gnome-theme"; - source = (fetchTarball "https://github.com/rafaelmardojai/firefox-gnome-theme/archive/master.tar.gz"); -}; + home.file."firefox-gnome-theme" = { + target = ".mozilla/firefox/default/chrome/firefox-gnome-theme"; + source = (fetchTarball "https://github.com/rafaelmardojai/firefox-gnome-theme/archive/master.tar.gz"); + }; -programs.firefox = { - enable = true; - profiles.default = { - name = "Default"; - settings = { - "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; + programs.firefox = { + enable = true; + profiles.default = { + name = "Default"; + settings = { + "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; - # For Firefox GNOME theme: - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.tabs.drawInTitlebar" = false; - "svg.context-properties.content.enabled" = true; - }; - userChrome = '' - @import "firefox-gnome-theme/userChrome.css"; - @import "firefox-gnome-theme/theme/colors/dark.css"; - ''; - }; - }; + # For Firefox GNOME theme: + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "browser.tabs.drawInTitlebar" = false; + "svg.context-properties.content.enabled" = true; + }; + userChrome = '' + @import "firefox-gnome-theme/userChrome.css"; + @import "firefox-gnome-theme/theme/colors/dark.css"; + ''; + }; + }; }; }