Restore to state when unfree packages worked
This commit is contained in:
parent
29ba7fb662
commit
834b00c89f
34
common.nix
Normal file
34
common.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{lib, ...}: let
|
||||
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
||||
in {
|
||||
imports = [(import "${home-manager}/nixos")];
|
||||
nix = {
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
extraOptions = ''
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
};
|
||||
system.autoUpgrade.enable = lib.mkDefault false;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
virtualisation.podman.enable = true;
|
||||
programs = {
|
||||
ssh.startAgent = true;
|
||||
dconf.enable = true;
|
||||
fish.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
fonts.fontconfig.enable = true;
|
||||
environment.localBinInPath = true;
|
||||
}
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687365523,
|
||||
"narHash": "sha256-2l/cPXDCDVcLNm+EvCRGJcJ9YxxyLbc2vfTah/t8Qwc=",
|
||||
"lastModified": 1687421788,
|
||||
"narHash": "sha256-CgoHjiUBnru0bV4PE8z1R6ZD9KeWtuAaUkyYWYJmQUE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1fefd7bb8da0eec6755747f410fa491411a94296",
|
||||
"rev": "a4817894576f9cd01d784e60a0bfb143c81fc2be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
90
flake.nix
90
flake.nix
|
@ -13,103 +13,27 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
}: let
|
||||
pkgs = import nixpkgs {config = {allowUnfree = true;};};
|
||||
common-config = {...}: {
|
||||
nix = {
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
extraOptions = ''
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
services.power-profiles-daemon.enable = true;
|
||||
virtualisation.podman.enable = true;
|
||||
programs = {
|
||||
ssh.startAgent = true;
|
||||
dconf.enable = true;
|
||||
fish.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
fonts.fontconfig.enable = true;
|
||||
environment.localBinInPath = true;
|
||||
};
|
||||
locale-en_GB = {...}: {
|
||||
services.xserver = {
|
||||
layout = "gb";
|
||||
xkbVariant = "";
|
||||
};
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
};
|
||||
audio = {...}: {
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
programs.noisetorch.enable = true;
|
||||
};
|
||||
bluetooth = {...}: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
nixosConfigurations = {
|
||||
Legion = nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
common-config
|
||||
locale-en_GB
|
||||
./hosts/Legion/configuration.nix
|
||||
./common.nix
|
||||
./locales/en_GB.nix
|
||||
./services/Legion.nix
|
||||
];
|
||||
};
|
||||
N0245 = nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs;
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
common-config
|
||||
locale-en_GB
|
||||
audio
|
||||
bluetooth
|
||||
./hosts/N0245/configuration.nix
|
||||
./common.nix
|
||||
./hardware/audio.nix
|
||||
./hardware/bluetooth.nix
|
||||
./locales/en_GB.nix
|
||||
./wm/sway.nix
|
||||
./services/syncthing/N0245.nix
|
||||
];
|
||||
|
|
13
hardware/audio.nix
Normal file
13
hardware/audio.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
# 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;
|
||||
};
|
||||
programs.noisetorch.enable = true;
|
||||
}
|
6
hardware/bluetooth.nix
Normal file
6
hardware/bluetooth.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
}
|
25
locales/en_GB.nix
Normal file
25
locales/en_GB.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{...}: {
|
||||
services.xserver = {
|
||||
layout = "gb";
|
||||
xkbVariant = "";
|
||||
};
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
LC_IDENTIFICATION = "en_GB.UTF-8";
|
||||
LC_MEASUREMENT = "en_GB.UTF-8";
|
||||
LC_MONETARY = "en_GB.UTF-8";
|
||||
LC_NAME = "en_GB.UTF-8";
|
||||
LC_NUMERIC = "en_GB.UTF-8";
|
||||
LC_PAPER = "en_GB.UTF-8";
|
||||
LC_TELEPHONE = "en_GB.UTF-8";
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue