enable home-manager
This commit is contained in:
@@ -32,11 +32,15 @@ in
|
|||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = false;
|
boot.loader.systemd-boot.enable = false;
|
||||||
boot.loader.systemd-boot.configurationLimit = 5;
|
boot.loader.systemd-boot.configurationLimit = 2;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||||
|
# boot.plymouth.enable = true;
|
||||||
boot.bootspec.enable = true;
|
boot.bootspec.enable = true;
|
||||||
|
boot.consoleLogLevel = 3;
|
||||||
|
boot.kernelParams = [
|
||||||
|
"quiet" "amdgpu.ppfeaturemask=0xffffffff"
|
||||||
|
];
|
||||||
|
|
||||||
boot.lanzaboote = {
|
boot.lanzaboote = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -227,6 +231,31 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.sudo = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [{
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/reboot";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${pkgs.systemd}/bin/poweroff";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "/home/matt/reset_wifi";
|
||||||
|
options = [ "NOPASSWD" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|||||||
39
flake.lock
generated
39
flake.lock
generated
@@ -166,6 +166,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1707175763,
|
||||||
|
"narHash": "sha256-0MKHC6tQ4KEuM5rui6DjKZ/VNiSANB4E+DJ/+wPS1PU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "f99eace7c167b8a6a0871849493b1c613d0f1b80",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"kde": {
|
"kde": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
@@ -173,11 +193,11 @@
|
|||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706731447,
|
"lastModified": 1707218112,
|
||||||
"narHash": "sha256-VbsFKQZwtFH6+k4U/YjgF20Byhz4Z21kmoLcG5dV2M8=",
|
"narHash": "sha256-GXwhrTyeIj38aBi8t6fxasuJ3h2AhvxDypAxQjKrrTY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "kde2nix",
|
"repo": "kde2nix",
|
||||||
"rev": "e7aded2df9d79e3c23c953bd6011b66ba2b87d98",
|
"rev": "285ae35495f7a39aacf91598ecf154035bc5d2e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -230,11 +250,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706672657,
|
"lastModified": 1706812040,
|
||||||
"narHash": "sha256-API05c0SDZrmzz1wpqt/K3iCwlaOqDeDfZGp0YGQnek=",
|
"narHash": "sha256-pxgWZApBfqHi4I6Hz7nL/rSt0vGE62HvBwvuVXFXeOk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "632751bf0ceeefc74af7a9d2335ea923ad9c831a",
|
"rev": "5c5bca5a97c0982ea37a2fcf6d3860349b9f9a35",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -278,11 +298,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1706550542,
|
"lastModified": 1707092692,
|
||||||
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
|
"narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
|
"rev": "faf912b086576fd1a15fca610166c98d47bc667e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -353,6 +373,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
"kde": "kde",
|
"kde": "kde",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
|
|||||||
10
flake.nix
10
flake.nix
@@ -6,6 +6,8 @@
|
|||||||
kde.url = "github:nix-community/kde2nix";
|
kde.url = "github:nix-community/kde2nix";
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||||
# impermanence.url = "github:nix-community/impermanence";
|
# impermanence.url = "github:nix-community/impermanence";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
url = "github:nix-community/lanzaboote/v0.3.0";
|
url = "github:nix-community/lanzaboote/v0.3.0";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -13,7 +15,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# outputs = { self, nixpkgs, impermanence, lanzaboote } @ inputs: {
|
# outputs = { self, nixpkgs, impermanence, lanzaboote } @ inputs: {
|
||||||
outputs = { self, nixpkgs, lanzaboote, kde, nix-flatpak } @ inputs: {
|
outputs = { self, nixpkgs, lanzaboote, kde, nix-flatpak, home-manager } @ inputs: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"matt-nixos" = nixpkgs.lib.nixosSystem {
|
"matt-nixos" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -24,6 +26,12 @@
|
|||||||
nix-flatpak.nixosModules.nix-flatpak
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
# ./impermanence.nix
|
# ./impermanence.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.matt = import ./home.nix;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
36
home.nix
Normal file
36
home.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
home.username = "matt";
|
||||||
|
home.homeDirectory = "/home/matt";
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
programs.fish.enable = true;
|
||||||
|
programs.mangohud.enable = true;
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "mjallen18";
|
||||||
|
userEmail = "matt.l.jallen@gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
# custom systemd services
|
||||||
|
systemd.user.services.fix-wifi = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Reset wifi adapter so that it works on boot consistently.";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "/home/matt/nix-config/reset_wifi";
|
||||||
|
# ExecStart = "${pkgs.writeShellScript "fix-wifi" ''
|
||||||
|
# #!/usr/bin/env bash
|
||||||
|
# echo 1 | sudo -u root tee /sys/bus/pci/devices/0000\:09\:00.0/reset
|
||||||
|
# sudo rmmod iwlwifi
|
||||||
|
# sudo modprobe iwlwifi
|
||||||
|
# ''}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
5
reset_wifi
Executable file
5
reset_wifi
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo 1 | sudo -u root tee /sys/bus/pci/devices/0000\:09\:00.0/reset
|
||||||
|
sudo rmmod iwlwifi
|
||||||
|
sudo modprobe iwlwifi
|
||||||
|
|
||||||
Reference in New Issue
Block a user